From 7b7d03bafa71ee1c2ae4f242d6b84e79ebc38913 Mon Sep 17 00:00:00 2001 From: Davide Ferracin Date: Tue, 7 Oct 2025 14:45:45 +0200 Subject: [PATCH] i18n: Add context to "Power mode" title string MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The "Power mode" string in the quick settings menu appears both in the title of the button and as the menu header that opens when clicking on such button. Currently they are translated together, but---at least in Italian---the standard translation, "Modalità energia", is too long to fit in the button and is very often truncated to "Modalità…" (aka "Mode", in English) from which is not clear what the menu is about. We would use "Energia" for the button title, but at the same time it would be nice to have the full "Modalità energia" translation in the menu header, where there is more space available. For this reason I propose to add contexts to the two "Power mode" strings, so that the string can be translated in different ways depending on its position. Part-of: --- js/ui/status/powerProfiles.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ui/status/powerProfiles.js b/js/ui/status/powerProfiles.js index 31877209c..ebaf1f8ea 100644 --- a/js/ui/status/powerProfiles.js +++ b/js/ui/status/powerProfiles.js @@ -42,7 +42,7 @@ const PowerProfilesToggle = GObject.registerClass( class PowerProfilesToggle extends QuickMenuToggle { _init() { super._init({ - title: _('Power Mode'), + title: C_('Quick settings button title', 'Power Mode'), menuButtonAccessibleName: _('Open power profiles menu'), }); @@ -74,7 +74,7 @@ class PowerProfilesToggle extends QuickMenuToggle { this._profileSection = new PopupMenu.PopupMenuSection(); this.menu.addMenuItem(this._profileSection); - this.menu.setHeader('power-profile-balanced-symbolic', _('Power Mode')); + this.menu.setHeader('power-profile-balanced-symbolic', C_('Quick settings menu header', 'Power Mode')); this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); this.menu.addSettingsAction(_('Power Settings'), 'gnome-power-panel.desktop'); -- 2.39.5